<template>
	<page-loading :show='pageLoading'>
		<view class="chooseAddressee">
			<!-- <u-navbar :is-back="true" title="" :border-bottom="false"></u-navbar> -->

			<!-- 搜索 -->
			<!-- <view class="search">
			<u-search @change="change" @search="search" placeholder="搜索联系人" v-model="keyword" :show-action="false"></u-search>
		</view> -->
			<!-- 用户列表 -->
			<!-- v-show="item.data.length!==0" -->
			<view class="user-list-box selected">
				<u-index-list class="scroll" :index-list="indexList" :sticky="false" activeColor="#FBB000"
					:scrollTop="scrollTop">
					<!-- <scroll-view class="scroll" @scroll="scroll" :style="{'height':scHeight+'vh'}" scroll-y v-if="indexList.length > 0" :scroll-into-view="anchor" scroll-with-animation> -->
					<!-- <view v-for="item in 25">11</view> -->
					<view class="item" v-for="(item, index) in contactList" :key="index">
						<!-- <view class="index-anchor" v-show="item.data.length!==0"><text>{{item.letter}}</text></view> -->
						<u-index-anchor :index="item.letter" v-show="item.data.length!==0" />
						<view class="index-item">
							<view class="children-item" @click="share(item2)" v-for="(item2,i) in item.data"
								:key='item2.uid'>
								<view class="user flex flex-ai-c">
									<image class="avatar" :src="item2.headImg"></image>
									<view class="info flex flex-ai-c">
										<text>{{item2.userName}}</text>

										<image class="badge"
											src="https://files.yzsheng.com/client/order/hehuorenicon.png"
											v-if="item2.isPartner"></image>
										<image class="badge" src="https://files.yzsheng.com/client/order/chebiao.png"
											v-if="item2.isOwner"></image>
										<view class="consume-status not"><text v-if="item2.isCostMoney">已消费</text><text
												v-else>未消费</text></view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<defaultImg :show='myFriend.length===0'></defaultImg>
					<!-- </scroll-view> -->
				</u-index-list>
				<!-- anchor = item.letter==='#'?'anchor-YZ':'anchor-' +item.letter -->
				<u-modal v-model="show" :show-title="false" :show-confirm-button="false" :mask-close-able="true">
					<view style="font-weight: bold;margin: 24rpx;">发送给：</view>
					<view class="flex flex-ai-c" style="margin: 0 24rpx;">
						<image style="width: 70rpx;height: 70rpx;border-radius: 50%;" :src="shareList.headImg"></image>
						<text style="margin-left: 20rpx;">{{shareList.userName}}</text>
					</view>
					<view class="flex flex-jc-c" style="margin: 40rpx 0;">
						<view class="cancel" @click="cancel">取消</view>
						<view class="send" @click="send">发送</view>
					</view>
				</u-modal>
				<!-- <view class="index-bar" v-if="indexList.length > 0">
				<text v-for="(item, index) in contactList" :key="index" @click="jumper(item.letter,index)" :class="['text',jumperIndex === index ?'avtive': '']">{{item.letter}}</text>
			</view> -->
			</view>
			<!--   @touchend.stop.prevent="touchend"
    @touchcancel.stop.prevent="touchcancel" -->
			<!-- 下一步操作 -->
			<!-- <view class="footer">
      <view class="btn-box">
        <view class="btn flex flex-ai-c flex-jc-c">
          <text class="text">下一步</text>
        </view>
      </view>
    </view> -->

		</view>
	</page-loading>
</template>

<script src='./myfriend.js'></script>

<style lang="scss">
	@import './myfriend.scss';
</style>
